package com.jiot.controller.device;

import com.zg.cloud.BaseResponse;
import com.zg.cloud.annotation.TokenCheck;
import com.zg.cloud.service.ThresholdService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author liling
 * @date 2020/12/1 16:42
 * @description
 **/
@RestController
@RequestMapping("/device/threshold")
@Api(value = "职能端用户模块")
public class DeviceThresholdController {

    @Resource
    private ThresholdService thresholdService;

    @PostMapping("/default/range")
    @TokenCheck
    @ApiOperation(value = "阈值范围", notes = "device")
    public BaseResponse defaultRange() {
        return new BaseResponse(thresholdService.defaultRange());
    }
}
